Automatic image segmentation or segment isolation is a challenging problem. Assuming sharply focused regions contain adequate high frequency components, it is possible to distinguish the focused regions from the unfocused image by comparing the amount of the high frequency content. Two approaches for the segmentation of images include edge-based and region-based approaches. The edge-based method extracts the boundary of the object by measuring the amount of defocus at each edge pixel.
The region-based segmentation algorithms rely on the detection of the high frequency areas in the image. Several methods have been used, such as spatial summation of the squared anti-Gaussian (SSAG) function, variance of wavelet coefficients in the high frequency bands, a multi-scale statistical description of high frequency wavelet coefficients and local variance. Using high frequency components alone often results in errors in determining both in focused and defocused regions.